package com.machinecontroller.utils;

import com.google.gson.Gson;
import com.machinecontroller.model.EVModel;

/**
 * Created by zhangxuehui on 2017/12/26.
 */

public class CommonUtils {
    /**
     * 转换类型
     * @param json
     * @param evModelClass
     * @return
     */
    public static EVModel parseObject(String json, Class<EVModel> evModelClass) {
        Gson gson = new Gson();
        return gson.fromJson(json, evModelClass);
    }
}
